package com.gamesnet.models;

import java.util.List;

public class Publication extends Listable{
	
	
	private long id;
	private String contenu, dateEnvoi;
	private Utilisateur sender;
	private List<Commentaire> commentaires;
	private int nbCom;

	public Publication(long id, String contenu, String dateEnvoi, Utilisateur sender, int nbCom) {
		this.id = id;
		this.contenu = contenu;
		this.dateEnvoi = dateEnvoi;
		this.sender = sender;
		this.nbCom = nbCom;
	}
	
	public Publication(long id, String contenu, String dateEnvoi,
			Utilisateur sender, List<Commentaire> commentaires) {
		this.id = id;
		this.contenu = contenu;
		this.dateEnvoi = dateEnvoi;
		this.sender = sender;
		this.commentaires = commentaires;
	}

	public String getDateEnvoi() {
		return dateEnvoi;
	}

	public Utilisateur getSender() {
		return sender;
	}

	public List<Commentaire> getCommentaires() {
		return commentaires;
	}

	public int getNbCom() {
		return nbCom;
	}

	@Override
	public String afficher() {
		// TODO Auto-generated method stub
		return contenu;
	}

	@Override
	public void supprimer() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public boolean isNew() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public String image() {
		// TODO Auto-generated method stub
		return sender.image();
	}

	@Override
	public long getId() {
		// TODO Auto-generated method stub
		return id;
	}

}
